package top.lcm889.nowcoder.hj;

import java.util.Scanner;
import java.util.concurrent.LinkedBlockingDeque;

/**
 * @author Coder-lcm
 * @date 2021/2/24
 */
public class HJ1_字符串最后一个单词的长度 {
    public static void main(String[] args) {
        LinkedBlockingDeque<String> blockingDeque = new LinkedBlockingDeque<>();
        blockingDeque.add("dsadad");
        blockingDeque.add("adad");
        blockingDeque.add("Dadada");


        System.out.println(blockingDeque.poll());
        System.out.println(blockingDeque.poll());
        System.out.println(blockingDeque.poll());
        System.out.println(blockingDeque.poll());

//        Scanner in = new Scanner(System.in);
//        String s = in.nextLine();
//        char[] chars = s.toCharArray();
//        int len = chars.length;
//        int res = 0;
//        for (int i = len -1 ; i >= 0 ; i--) {
//            if (chars[i] != ' '){
//                res++;
//            }else {
//                break;
//            }
//        }
//        System.out.println(res);
    }
}
